/*轮播*/
var swiper = new Swiper('.swiper-container', {
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
    },
    loop:true
});

/*json数据*/
var json = new Vue({
    el:"#json",
    data:{
        messages:'数据正在请求...',
    },
    mounted(){
        axios
            .get('json/tsconfig.json')
            .then(response => (this.messages = response.data.urls))
            .catch(function (error) {
                console.log(error)
            })
    }
})


/*返回顶部*/
var t = document.querySelector(".fh");
console.log(t);
window.onscroll =function () {
    console.log(document.documentElement.scrollTop > 1000 || document.body.scrollTop > 1000);
    if (document.documentElement.scrollTop > 1000 || document.body.scrollTop > 1000){
        t.style.display= "block";
    }else{
        t.style.display= "none";
    }
},
t.addEventListener('click',function () {
   // window.scrollTo(0,0);
    window.scrollTo({
         top:0,
        behavior:'smooth'
   })
})
